package com.intelligentmeterreadingsys.waterlist.reviewdata.activity;

import com.intelligentmeterreadingsys.R;
import com.intelligentmeterreadingsys.waterlist.querywaterlist.activity.QueryWaterListActivity;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Spinner;
import android.widget.AdapterView.OnItemSelectedListener;
import android.widget.TextView;

/**
 * 复查数据查询条件
 * @author king
 *
 */
public class ReviewQueryCondition extends Activity{
    public Button button1;
	
	public EditText edit1;//用户编号
	
	public EditText edit2;//用水性质
	
	
	public EditText edit4;//水表地址
	
	
	
    public Spinner spinner;//抄表状态
    
   
			
	private String usertype;
		
	public String getUsertype() {
		return usertype;
	}


	public void setUsertype(String usertype) {
		this.usertype = usertype;
	}

   public String[] date=new String[]{"未复抄","已复抄","二次复抄"};
	@Override
	protected void onCreate(Bundle savedInstanceState) {
	
		super.onCreate(savedInstanceState);
	
		setContentView(R.layout.review_condition);
		
		inti();
	}
   
	public void inti(){
		 ArrayAdapter<String> ada1=new ArrayAdapter<String>(this,android.R.layout.simple_spinner_item,date);
		 ada1.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
		edit1=(EditText)findViewById(R.id.review_condition_usernumber);
		edit2=(EditText)findViewById(R.id.review_condition_waterproperties);
		edit4=(EditText)findViewById(R.id.review_condition_wateradds);
	
		spinner=(Spinner)findViewById(R.id.review_condition_copytype);
		spinner.setAdapter(ada1);
		 button1=(Button)findViewById(R.id.review_condition_query);
		 
		 spinner.setOnItemSelectedListener(new OnItemSelectedListener() {

				@Override
				public void onItemSelected(AdapterView<?> arg0, View arg1,
						int arg2, long arg3) {
					usertype=arg0.getItemAtPosition(arg2).toString();
					
				}

				@Override
				public void onNothingSelected(AdapterView<?> arg0) {
					usertype="未复抄";
					
				}
				 
			});
			 
		 button1.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				
				
			}
		});
		 
		
	}
}
